#include <stdio.h>
#include <stdlib.h>
#define maxn 1005
struct deque{
    char *p;
    int front,rear;
    int Size,length;
};
deque Create(){
    deque d;
    d.p=(char*)malloc(sizeof(char)*maxn);
    d.front=maxn>>1;
    d.rear=maxn>>1;
    d.length=0;
    d.Size=maxn;
    return d;
}
void fro_Insert(deque &d, char e){
    d.p[d.front-1]=e;
    d.front--;
    d.length++;
}
void rear_Insert(deque &d, char e){
    d.p[d.rear]=e;
    d.rear++;
    d.length++;
}
void fro_Delete(deque &d){
    d.front++;
}
void rear_Delete(deque &d){
    d.rear--;
}
char get_Front(deque d){
    return d.p[d.front];
}
char get_Rear(deque d){
    return d.p[d.rear-1];
}
int main(){
    deque d;
    d=Create();
    char x;
    int er=0,i;
    while(~scanf("%c",&x)){
        if(x=='#'){
            break;
        }
        rear_Insert(d,x);
    }
    for (i = 0; i <d.length>>1 ; ++i) {
        if(get_Front(d)!=get_Rear(d)){
            er=1;
            break;
        }
        fro_Delete(d);
        rear_Delete(d);
    }
    if(er==0){
        printf("yes\n");
    } else{
        printf("no\n");
    }
}

